package com.zFace.单例模式;

/**
 * 懒汉式 DCL
 */
public class Demo02 {
	private volatile static Demo02 instance = null;

	private Demo02() {
	}

	public static Demo02 getInstance() {
		if (instance == null) {
			synchronized (Demo02.class) {
				if (instance == null) {
					instance = new Demo02();
				}
			}
		}
		return instance;
	}
}